package com.wboot01.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Data
@Configuration
@ConfigurationProperties(prefix = "person")
@PropertySource(value = {"classpath:/person.properties"})
public class AdminProperties {

  private String name;

  @Value("${person.age:10}")
  private Integer age;

  @Value("${person.city:nanjing}")
  private String city;
}
